export const measure = {
    mounted(el, binding) {
      const rect = el.getBoundingClientRect()
      if (typeof binding.value === 'function') {
        binding.value({ width: rect.width, height: rect.height })
      }
    },
    updated(el, binding) {
      const rect = el.getBoundingClientRect()
      if (typeof binding.value === 'function') {
        binding.value({ width: rect.width, height: rect.height })
      }
    }
  }